package com.numberone.master.modules.rsa.entity;

import com.numberone.master.modules.sys.entity.User;

import java.util.Date;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.numberone.master.common.persistence.DataEntity;

/**
 * rsa密匙Entity
 * @author ck
 * @version 2018-02-28
 */
public class RsaKey extends DataEntity<RsaKey> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 所属用户
	private String publicKey;		// 开发人公共钥匙
	private String privateKey;		// 物联网卡私有钥匙
	private String rsaState;		// 状态
	private String rsaType;		// 类型
	private String appKey;
	private Date createDate;//录入时间
	private String  dlPrivateKey;
	private String pfPublicKey;
	
	public RsaKey() {
		super();
	}

	public RsaKey(String id){
		super(id);
	}

	@NotNull(message="所属用户不能为空")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public String getPublicKey() {
		return publicKey;
	}

	public void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}
	
	public String getPrivateKey() {
		return privateKey;
	}

	public void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}
	
	@Length(min=0, max=1, message="状态长度必须介于 0 和 1 之间")
	public String getRsaState() {
		return rsaState;
	}

	public void setRsaState(String rsaState) {
		this.rsaState = rsaState;
	}
	
	@Length(min=0, max=1, message="类型长度必须介于 0 和 1 之间")
	public String getRsaType() {
		return rsaType;
	}

	public void setRsaType(String rsaType) {
		this.rsaType = rsaType;
	}

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getDlPrivateKey() {
		return dlPrivateKey;
	}

	public void setDlPrivateKey(String dlPrivateKey) {
		this.dlPrivateKey = dlPrivateKey;
	}

	public String getPfPublicKey() {
		return pfPublicKey;
	}

	public void setPfPublicKey(String pfPublicKey) {
		this.pfPublicKey = pfPublicKey;
	}
	
}